package api

import (
	"github.com/kataras/iris/context"
	"server/bitkop/core"
	"server/bitkop/app/service"
	"server/bitkop/app/common"
	"server/bitkop/app/constants"
)

func TrustOrder(ctx context.Context) {
	conn := core.BK.Redis.OTEPool.Get()
	if conn == nil {
		return
	}
	defer conn.Close()

	coinPair := ctx.URLParam("coin_pair")
	if coinPair == "" {
		ctx.JSON(common.Error(constants.PARAMETER_ERROR))
		return
	}
	ctx.JSON(common.Success(service.GetHistoryOrders(conn, coinPair, 4, 8)))
}

